<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./echarts.js"></script>
</head>

<body>
    <div style="widt:100%;height:600px;background:#001152" id="main"></div>
</body>

</html>
<script>
    let main = document.querySelector('#main')
    let obj = echarts.init(main)
    let option = {
        title: {
            text: '主要疫情国家治愈率',
            left: 'center',
            textStyle:{ 
                color:'#ffffff'
            }
        },
        xAxis: {
            type: 'value',
            show: false
        },
        yAxis: {
            type: 'category',
            data: ['意大利', '英国', '哥伦比亚', '西班牙', '美国'],
            axisLine: {
                show: false
            },
            axisTick: {
                show: false
            }
        },
        series: [

            {
                type: 'bar',
                data: ['13.3', '0.4', '92.6', '88.1', '77.7'],
                itemStyle: {
                    borderRadius: 30,
                },
                barWidth: 25,
                barGap: '-100%',
                label: {
                    show: true,
                    formatter: '{c}%'
                }
            },
            {
                type: 'bar',
                data: ['100', '100', '100', '100', '100'],
                itemStyle: {
                    borderRadius: 30,
                    color: 'none',
                    borderWidth: 5,
                    borderColor: '#00c3df',
                },
                barWidth: 25,
            }
        ]
    }
    obj.setOption(option)
</script>